import { _decorator, Component, Node } from 'cc';
import { allItems } from '../goods/allGoods';
import { BagItem } from '../goods/goodsInfo';
import { ScrollView } from './ScrollView';
const { ccclass, property } = _decorator;

@ccclass('ShopView')
export class ShopView extends Component {
    @property(Node) ndScrollView: Node = null;
    start() {
        let shangdians = [...allItems, ...allItems,...allItems]
        this.init(shangdians)
    }

    init(items: BagItem[]) {
        this.ndScrollView.getComponent(ScrollView).init(items);
    }
}


